line = input()
names = line.split(" ")
if len(names) <= 2:
    for i in names:
        print(i.capitalize(), end=" ")
else:
    print(names[0].capitalize(), end=" ")
    for i in names[1:-1]:
        print(i.capitalize()[0], end=". ")
    print(names[-1].capitalize(), end="")
